feat: implement cross-contract test package reference#142
Merged
Smartdevs17 merged 4 commits intoSmartdevs17:mainfrom Mar 26, 2026
Merged
Conversation
|
@devJaja is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@devJaja Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: implement cross-contract test package reference
Problem
cargo test --package hello-world --lib cross_contract_test ran 0 tests because the tests/cross_contract_test.rs
module was never wired into the crate, and the test file itself had compilation errors and logic mismatches
against the actual contract implementation.
Changes
src/lib.rs
pulling in the other broken test files under tests/mod.rs
src/deposit.rs
src/tests/cross_contract_test.rs
protocol's actual pull-repayment callback interface
blocks re-entry at the host level, not via our error enum
.github/workflows/ci-cd.yml
Test results
test cross_contract_test::test_flash_loan_happy_path ... ok
test cross_contract_test::test_deposit_borrow_interactions ... ok
test cross_contract_test::test_flash_loan_insufficient_liquidity - should panic ... ok
test cross_contract_test::test_cross_contract_error_propagation ... ok
test cross_contract_test::test_flash_loan_reentrancy_block - should panic ... ok
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured
Acceptance criteria
Closes: #27